<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;

use Illuminate\Support\Facades\Input;
class ExampleController extends Controller
{
    public function __construct(){
        $this->middleware('auth');
    }
    //GET /photo 索引 photo.index
    public function index(){
        echo 'this this index';
        return view('ajax');
    }
    //GET /photo/{photo} 显示 photo.show
    public function show($id){
        return 'this is show '.$id;
    }
    //POST /photo 保存 photo.store
    public function store(){

    }
    //GET /photo/create 创建 photo.create
    public function create(){
        return 'this this create';
    }
    //GET /photo/{photo}/edit 编辑 photo.edit
    public function edit($id){
        return 'this this edit'.$id;
    }
    //PUT/PATCH /photo/{photo} 更新 photo.update
    public function update($id){

    }
    //DELETE /photo/{photo} 删除 photo.destroy
    public function destroy($id){

    }

    public function ajaxExamp(Request $request){
        return json_encode(['msg'=>$request->content]);
    }


}
